package org.hawk.gwt.ppc.examples.internal;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;
/**
 * In this example we are invading to GWT sanctum - code of User.gwt.xml module.
 * @author alex.bereznevatiy@gmail.com
 *
 */
public class Internal implements EntryPoint {

	public void onModuleLoad() {
		try {
			final String someInternalClass = "com.google.gwt.user.client.ui.Label";
			Widget w = (Widget)Class.forName(someInternalClass).getConstructor(String.class).newInstance("I'm a label!");
			RootPanel.get().add(w);
		} catch (Throwable e) {
			GWT.log("Error!", e);
		}
	}

}
